package com.wujp.common.template.tools.register;

import com.wujp.common.template.tools.cache.BeanFactoryCache;
import com.wujp.common.template.tools.interfaces.BeanFactory;
import com.wujp.common.template.tools.interfaces.BeanFactoryRegister;

/**
 * @desc: bean工厂注册器，用到不同的bean需要先把对应的工厂注册进去,自动提供了ClassBeanFactory,但TemplateBeanFactory和springbean类型需要手工注册
 * @author: wujp
 * @create: 2023-01-18 15:27
 */
//TODO 应用启动时记得注册bean类型对应的工厂
public class BaseBeanFactoryRegister implements BeanFactoryRegister {

    @Override
    public void register(String beanType, BeanFactory beanFactory) {
        BeanFactoryCache.beanFactorys.put(beanType, beanFactory);
    }
}
